<?php

/*
        websocket.onopen = function(evt) {
            websocket.send('name:'+name);
        };
        websocket.onclose = function(evt) {
            append_speak("连接关闭");
        };
        websocket.onmessage = function(evt) {
            append_speak(evt.data);
        };
        websocket.onerror = function(evt) {
           append_speak('连接失败');
        };



    function speak_to_all(){
        var speak").val(); 
        doSend(name+':'+speak);
        $("").val('');
    }


    function append_speak(new_msg){
        $("").append("<li>"+new_msg+"</li>");
        $("").scrollTop($('')[0].scrollHeight);
    }

    function doSend(message) {
        websocket.send(message);
    }

		
		
*/